package freespiritsocial.io.user.viewmodel

import freespiritsocial.io.user.network.apiService
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel
import me.hgj.jetpackmvvm.callback.databind.StringObservableField
import me.hgj.jetpackmvvm.ext.request

class ConctactUsViewModel: BaseViewModel() {
    val topic = StringObservableField()
    val message = StringObservableField()

    fun contactUs(callback: () -> Unit) {
        request({
            apiService.contactUs(
                hashMapOf("topic" to topic.get(),"message" to message.get())
            )
        },{
            callback()
        },isShowDialog = true)
    }
}
